<template>
	<view>
		<view class="c343 bold f32 mt20 textC">{{detail.protName}}</view>
		<u-gap height="20"></u-gap>
		<view class="bgFff p30 content-box f26">
			<u-parse :content="detail.protText"></u-parse>
		</view>
	</view>
</template>

<script>
	import {
		getProtocolBycode
	} from '@/common/api_user.js'
	export default {
		name: '',
		data() {
			return {
				code: '',
				detail: {}
			}
		},
		onLoad(option) {
			this.code = option.code
			this.getBuyNotice()
		},
		methods: {
			async getBuyNotice() { //购买须知
				uni.showLoading({
					mask: true
				})
				const res = await getProtocolBycode({
					code: this.code
				})
				if (res.code == 200) {
					this.detail = res.data
					uni.setNavigationBarTitle({
						title: this.detail.protName
					})
				}
				uni.hideLoading()
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #FEF4E8;
	}

	.content-box {
		border-radius: 30rpx 30rpx 0 0;
		min-height: 90vh;
	}
</style>